/*


 */

package jas.bank;

import jas.rpc.RemoteException;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 *
 *
 */
public class BankImpl implements Bank, Serializable {
    
    private Map<String, Account> accounts = new HashMap<String, Account>();
    
    public Account getAccount(String name) throws RemoteException {
        Account a = accounts.get(name);
        if (a == null) {
            a = new AccountImpl(name);
            accounts.put(name, a);
        }
        return a;
    }

}
